package com.direct.domian;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 货车
 * 
 * @author Administrator
 * 
 */

public class Truck {
	
	public static final Integer USABLE = 1;//可用
	public static final Integer DISABLE = 2;//不可用

	private String id;
	// 购车负责人
	private Employee buyer;
	// 当前所在路线
	private Road road;
	// 车牌号
	private String carNum;
	// 型号
	private String model;
	/**
	 *  产地
	 */
	private String place;
	/**
	 * 出产日期
	 */
	private Date deliveryTime;
	/**
	 * 购买日期
	 */
	private Date buyTime;
	// 载重
	private Double capcity;
	// 状态(1：可用 2：不可用)
	private Integer state;
	//当前驾驶司机
	private Driver drivers;
	/**
	 * 图片
	 */
	private String img;
	
	//交接单
	private Set<Transfer> tansbill = new HashSet<Transfer>();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Employee getBuyer() {
		return buyer;
	}

	public void setBuyer(Employee buyer) {
		this.buyer = buyer;
	}

	public Road getRoad() {
		return road;
	}

	public void setRoad(Road road) {
		this.road = road;
	}

	public String getCarNum() {
		return carNum;
	}

	public void setCarNum(String carNum) {
		this.carNum = carNum;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public Date getDeliveryTime() {
		return deliveryTime;
	}

	public void setDeliveryTime(Date deliveryTime) {
		this.deliveryTime = deliveryTime;
	}

	public Date getBuyTime() {
		return buyTime;
	}

	public void setBuyTime(Date buyTime) {
		this.buyTime = buyTime;
	}

	public Double getCapcity() {
		return capcity;
	}

	public void setCapcity(Double capcity) {
		this.capcity = capcity;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Driver getDrivers() {
		return drivers;
	}

	public void setDrivers(Driver drivers) {
		this.drivers = drivers;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public Set<Transfer> getTansbill() {
		return tansbill;
	}

	public void setTansbill(Set<Transfer> tansbill) {
		this.tansbill = tansbill;
	}

	public Truck(String id, Employee buyer, Road road, String carNum,
			String model, String place, Date deliveryTime, Date buyTime,
			Double capcity, Integer state, Driver drivers, String img,
			Set<Transfer> tansbill) {
		super();
		this.id = id;
		this.buyer = buyer;
		this.road = road;
		this.carNum = carNum;
		this.model = model;
		this.place = place;
		this.deliveryTime = deliveryTime;
		this.buyTime = buyTime;
		this.capcity = capcity;
		this.state = state;
		this.drivers = drivers;
		this.img = img;
		this.tansbill = tansbill;
	}

	public Truck() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public String toString() {
		return "Truck [id=" + id + ", buyer=" + buyer + ", road=" + road
				+ ", carNum=" + carNum + ", model=" + model + ", place="
				+ place + ", deliveryTime=" + deliveryTime + ", buyTime="
				+ buyTime + ", capcity=" + capcity + ", state=" + state
				+ ", drivers=" + drivers + ", img=" + img + ", tansbill="
				+ tansbill + "]";
	}
	
	
	
	
}